import request from '@/utils/request'
// 查询上片的玻璃信息
export function upGlassList(query) {
  return request({
    url: '/assembly/glass/getUpGlassList',
    method: 'get',
    params: query
  })
}
// 查询玻璃信息列表
export function listGlass(query) {
  return request({
    url: '/assembly/glass/query/list',
    method: 'get',
    params: query
  })
}
export function listGlass2(query) {
  return request({
    url: '/assembly/glass/query/list2',
    method: 'get',
    params: query
  })
}

export function listGlass3(query) {
  return request({
    url: '/assembly/glass/query/list3',
    method: 'get',
    params: query
  })
}



// 查询玻璃信息详细
export function getGlass(id) {
  return request({
    url: '/assembly/glass/' + id,
    method: 'get'
  })
}

// 新增玻璃信息
export function addGlass(data) {
  return request({
    url: '/assembly/glass',
    method: 'post',
    data: data
  })
}

// 修改玻璃信息
export function updateGlass(data) {
  return request({
    url: '/assembly/glass',
    method: 'put',
    data: data
  })
}

// 修改玻璃信息
export function updateGlassBatchState(ids) {
  ids = JSON.stringify(ids);
  return request({
    url: '/assembly/glass/batchState',
    method: 'post',
    data: ids
  })
}
// 修改玻璃信息
export function updateGlassBatchClear(ids) {
  ids = JSON.stringify(ids);
  return request({
    url: '/assembly/glass/batchClear',
    method: 'post',
    data: ids
  })
}


// 删除玻璃信息
export function delGlass(id) {
  return request({
    url: '/assembly/glass/' + id,
    method: 'delete'
  })
}

// 获取相机扫码信息
export function getCameraGlass() {
  return request({
    url: '/assembly/glass/read/code/cage/list',
    method: 'get'
  })
}


export function getSectionGlass(params) {
  return request({
    url: 'assembly/glass/place',
    method: 'post',
    data:params
  })
}


// 修改玻璃位置信息
export function modifyGlassPlace(data) {
  return request({
    url: '/assembly/glass/modifyGlassPlace',
    method: 'post',
    data
  })
}


// 根据码内容查询玻璃位置信息
export function readCodeGlass(params) {
  return request({
    url: '/imitate/readCodeGlass',
    method: 'get',
    params
  })
}

// 获取排炉图数据
export function outShow(params) {
  return request({
    url: '/furnace/outShow',
    method: 'get',
    params
  })
}

// pda扫码重建队列
export function updateQuenue(data) {
  return request({
    url: '/assembly/updateGlass',
    method: 'post',
    data
  })
}